﻿using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    public class PacuOperInfoCtrlViewModel : BaseViewModel<PacuOperInfoCtrlViewModel>
    {
        #region Variables


        #endregion


        #region Constructor

        #endregion


        #region Properties


        #endregion


        #region 依赖属性


        #endregion


        #region Event


        #endregion


        #region PrivateMethods


        #endregion


        #region Public/ProtectedMethods

        public void CalTotalPoint()
        {
            int zongf = 0;
            if (PatientLink.Pacu.Qingxing0)
            {
                zongf += 0;
            }
            if (PatientLink.Pacu.Qingxing1)
            {
                zongf += 1;
            }
            if (PatientLink.Pacu.Qingxing2)
            {
                zongf += 2;
            }

            if (PatientLink.Pacu.Huxi0)
            {
                zongf += 0;
            }
            if (PatientLink.Pacu.Huxi1)
            {
                zongf += 1;
            }
            if (PatientLink.Pacu.Huxi2)
            {
                zongf += 2;
            }

            if (PatientLink.Pacu.Zhiti0)
            {
                zongf += 0;
            }
            if (PatientLink.Pacu.Zhiti1)
            {
                zongf += 1;
            }
            if (PatientLink.Pacu.Zhiti2)
            {
                zongf += 2;
            }

            DataManager.Instance.CurrentPatientLink.Pacu.Zongfen = zongf.ToString();
            PatientLinkService.Instance.AddUpdate(PatientLink);
        }
        #endregion


        #region EventHandlers


        #endregion

    }
}
